package com.wish.wishsystem_management.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.wish.wishsystem_management.entity.SysInterfaceInfo;
import com.wish.wishsystem_management.mapper.SysInterfaceInfoMapper;
import com.wish.wishsystem_management.service.ISysInterfaceInfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author zhaiwj
 * @since 2021-03-22
 */
@Service
public class SysInterfaceInfoServiceImpl extends ServiceImpl<SysInterfaceInfoMapper, SysInterfaceInfo> implements ISysInterfaceInfoService {
    @Autowired
    private SysInterfaceInfoMapper sysInterfaceInfoMapper;

    @Override
    public PageInfo<SysInterfaceInfo> queryList(Integer pageNum, Integer pageSize, SysInterfaceInfo interfaceInfo) {
        PageHelper.startPage(pageNum, pageSize);
        List<SysInterfaceInfo> list = sysInterfaceInfoMapper.queryList(interfaceInfo);

        return new PageInfo<>(list);
    }

    @Override
    public boolean updateAll(SysInterfaceInfo sysInterfaceInfo) {

        sysInterfaceInfoMapper.updateAll(sysInterfaceInfo);
        return true;
    }

    @Override
    public boolean deleteAll(String id) {
        sysInterfaceInfoMapper.deleteAll(id);
        return true;
    }


}
